<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Section 6.6.&nbsp; Implementation Differences</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch06lev1sec5.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch06lev1sec7.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="ch06lev1sec6"></a>
<h3 class="docSection1Title">6.6. Implementation Differences</h3>
<p class="docText"><a name="idd1e43702"></a><a name="idd1e43707"></a><a name="idd1e43712"></a><a name="idd1e43717"></a><a name="idd1e43722"></a><a name="idd1e43727"></a><a name="idd1e43732"></a><a name="idd1e43735"></a><a name="idd1e43738"></a><a name="idd1e43741"></a><a name="idd1e43746"></a><a name="idd1e43749"></a><a name="idd1e43752"></a><a name="idd1e43757"></a><a name="idd1e43760"></a><a name="idd1e43763"></a><a name="idd1e43768"></a>We've already discussed the shadow password file supported by Linux and Solaris. FreeBSD and Mac OS X store encrypted passwords differently. <a class="docLink" href="#ch06fig05">Figure 6.5</a> summarizes how the four platforms covered in this book store user and group information.</P>
<a name="ch06fig05"></a><P><table cellspacing="0" class="allBorders" border="1" RULES="groups" cellpadding="5"><caption><h5 class="docTableTitle">Figure 6.5. Account implementation differences</H5></caption><colgroup><col width="120"><col width="100"><col width="100"><col width="80"><col width="100"></colgroup><thead><TR><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Information</span></P></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">FreeBSD <br>5.2.1</span></P></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Linux <BR>2.4.22</span></P></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Mac OS X 10.3</span></p></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Solaris <BR>9</span></p></th></TR></thead><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">Account information</p></TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>/etc/passwd</tt></p></TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>/etc/passwd</tt></p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>netinfo</tt></p></TD><td class="docTableCell" align="left" valign="top"><p class="docText"><tt>/etc/passwd</tt>
</P></td></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText">Encrypted passwords</p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>/etc/master.passwd</tt></p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>/etc/shadow</tt></p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>netinfo</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText"><tt>/etc/shadow</tt>
</p></td></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">Hashed password files?</p></TD><TD class="rightBorder" align="left" valign="top"><p class="docText">yes</P></td><TD class="rightBorder" align="left" valign="top"><p class="docText">no</P></TD><td class="rightBorder" align="left" valign="top"><p class="docText">no</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">no</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">Group information</p></TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>/etc/group</tt></p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>/etc/group</tt></p></TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>netinfo</tt></P></td><TD class="docTableCell" align="left" valign="top"><p class="docText"><tt>/etc/group</tt>
</p></td></tr></table></p><br>
<p class="docText">On FreeBSD, the shadow password file is <tt>/etc/master.passwd</tt>. Special commands are used to edit it, which in turn generate a copy of <tt>/etc/passwd</tt> from the shadow password file. In addition, hashed versions of the files are also generated: <tt>/etc/pwd.db</tt> is the hashed version of <tt>/etc/passwd</tt>, and <tt>/etc/spwd.db</tt> is the hashed version of <tt>/etc/master.passwd</tt>. These provide better performance for large installations.</p>
<p class="docText">On Mac OS X, however, <tt>/etc/passwd</tt> and <tt>/etc/master.passwd</tt> are used only in single-user mode (when the system is undergoing maintenance; single-user mode usually means that no system services are enabled). In multiuser modeduring normal operationthe <tt>netinfo</tt> directory service provides access to account information for users and groups.</p>
<p class="docText">Although Linux and Solaris support similar shadow password interfaces, there are some subtle differences. For example, the integer fields shown in <a class="docLink" href="ch06lev1sec3.html#ch06fig03">Figure 6.3</a> are defined as type <tt>int</tt> on Solaris, but as <tt>long int</tt> on Linux. Another difference is the account-inactive field. Solaris defines it to be the number of days since the user last logged in to the system, whereas Linux defines it to be the number of days after which the maximum password age has been reached.</p>
<p class="docText">On many systems, the user and group databases are implemented using the Network Information Service (NIS). This allows administrators to edit a master copy of the databases and distribute them automatically to all servers in an organization. Client systems contact servers to look up information about users and groups. NIS+ and the Lightweight Directory Access Protocol (LDAP) provide similar functionality. Many systems control the method used to administer each type of information through the <tt>/etc/nsswitch.conf</tt> configuration file.</p>

<ul></ul></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch06lev1sec5.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch06lev1sec7.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
</body></html><br>
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;"> 
<tr> <td align="right" style="background-color=white; border-top: 1px solid gray;"> 
<a href="http://www.zipghost.com/" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">The CHM file was converted to HTM by Trial version of <b>ChmD<!--165-->ecompiler</b>.</a>
</TD>
</TR><tr>
<td align="right" style="background-color=white; "> 
<a href="http://www.etextwizard.com/download/cd/cdsetup.exe" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">Download <b>ChmDec<!--165-->ompiler</b> at: http://www.zipghost.com</a>
</TD></tr></table>
